<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
<title>목록보기</title>

<link rel="stylesheet" href="../../css/style.css" type="text/css">        


        
<meta http-equiv="Content-Type" content="text/html;">

<script language="JavaScript">

	
	//공백제거
	function trimStr(s) {
		var str="";
		
		for ( var i = 0; i < s.length; i++) {
			if (escape(s.charAt(i)) != "%20")
				str += s.charAt(i);
		}
		alert(str);
		return str;
	}

	
	//조건검색
	function search() {
		var key = f.search_key.value;
		var value = f.search_value.value;

		if (key == "All") {
			location.href="community_main.do?menu_no="+${menu_no}
					+"&cate_no="+${cate_no}
					+"&title_no="+${title_no}
					+"&state=list";
			return;
		}

		

		else if (value == "") {
			value = trimStr(value);
			alert("조건을 입력하세요!");
			return;
		}
		
		var url = "community_main.do?key="+key+
				"&value="+value+
				"&menu_no="+${menu_no}+
				"&cate_no="+${cate_no}+
				"&title_no="+${title_no}+ 
				"&state=list";
				
		f.method = "POST";
		f.action = url;
		f.submit();
		
	} 
	
	function moveLocal(no){
    	var title_no=no;
    	var menu_no=${menu_no};
    	var cate_no=${cate_no};
    	
    	location.href="../main/community_main.do?menu_no="+menu_no+"&cate_no="+cate_no+"&title_no="+title_no+"&state=list";
    }
	
	
	
	/* //지역별검색
	function moveLocal(t_no) {
		var title_no = t_no;
		
		var menu_no = ${menu_no};
		var cate_no = ${cate_no};

		location.href = "../main/community_main.do?menu_no=" + menu_no
				+ "&cate_no=" + cate_no + "&title_no=" + title_no
				+ "&state=list";
	} */
</script>
</head>




<body>



<!--로케이션 & 로그인끝-->
<!--타이틀 영역-->
<!--LIST START--><hr>

<table width="690" border="0"  cellspacing="0" cellpadding="0"
style="border-top-width: 7;border-top-color: black; border-top-style:groove;
       border-left-width: 0; border-left-style: hidden;
        " >
        
			<tr >
				<td class="td_midium" >번호</td>
				<td class="td_midium">제목</td>
				<td class="td_midium">작성자</td>
				<td class="td_midium">작성일</td>
				<td class="td_midium">조회수</td>
			</tr>
			
			
<!-- 공지사항 -->
	

	
<!-- 리스트 -->	
	<c:forEach var="bvo" items="${range_list}">
		<tr style="color: white;" >
		<td>${bvo.b_no }</td>
	
		
		
		<td>${bvo.b_writer }</td>
		<td>${bvo.b_writedate }</td>
		<td>${bvo.b_readhit }</td>
		</tr>
	</c:forEach>
	
	<c:if test="${empty range_list}">
		<td colspan="5" align="center"><hr>현재 등록된 글이 없습니다.</td>
	</c:if>
	
	
	
</table>	
	
<!-- 검색 -->	

		
		
